/**
 * Created by Eric on 14-1-5.
 */
define({
    fields: [
        {field: 'id', title: '用户ID', width: 60, align: 'center'},
        {field: 'name', title: '用户名称', width: 150, align: 'center'},
        {field: 'type', title: '电话号码', width: 150, align: 'center'},
        {field: 'desc', title: '描述', align: 'center'}
    ],
    views: ['from', 'table','dialog'],

    views_table: {
        target: '#testTab',
        method: 'get',
        url: '/api/users',
        autoRowHeight: false,
        fitColumns: true,
        pagination: true,
        singleSelect: true,
        loadMsg: '努力加载中...',
        idFieldL: 'id'
    },
    view_from: {
        url: '/api/user/$id',
        target: '#addForm',
        type: 'POST',
        dataType: 'json',
        clearForm: true,
        beforeSubmit: function (formData, jqForm, options) {
            return true;
        },
        success: function (data, statusText) {
            console.log("submit success.");
        }
    },
    view_dialog:{
        title: '用户信息',
        width: 450,
        height: 250,
        closed: true,
        cache: false,
        resizable: true,
        modal: true
    },
    validates: [

    ]
});